Namespace OpenArchive
    Namespace Document
        Namespace Components
            Public Class InfoComponent
                Inherits Component
                Private m_Version As New Version(1, 0)
                Private c_ComponentName As String = "Info"
                Sub New()
                    MyBase.SetComponentName(c_ComponentName)
                    Initialize()
                End Sub
                Private Sub Initialize()
                    DataObjects = New Data.InfoComponentData()
                    Version = m_Version
                    DirectCast(DataObjects, Data.InfoComponentData).Guid = Guid.NewGuid()
                    DirectCast(DataObjects, Data.InfoComponentData).Created = Date.Now
                End Sub
                Public Property DocType() As String
                    Get
                        Global.System.Diagnostics.Debug.WriteLine("Getter of DocType passed")
                        Return DirectCast(DataObjects, Data.InfoComponentData).DocType
                    End Get
                    Set(ByVal value As String)
                        DirectCast(DataObjects, Data.InfoComponentData).DocType = value
                    End Set
                End Property
                Public Property Guid() As Guid
                    Get
                        Global.System.Diagnostics.Debug.WriteLine("Getter of Guid passed")
                        Return DirectCast(DataObjects, Data.InfoComponentData).Guid
                    End Get
                    Set(ByVal value As Guid)
                        DirectCast(DataObjects, Data.InfoComponentData).Guid = value
                    End Set
                End Property
                Public Property ExternalID() As String
                    Get
                        Global.System.Diagnostics.Debug.WriteLine("Getter of ExternalID passed")
                        Return DirectCast(DataObjects, Data.InfoComponentData).ExternalID
                    End Get
                    Set(ByVal value As String)
                        DirectCast(DataObjects, Data.InfoComponentData).ExternalID = value
                    End Set
                End Property
                Public Property Retention() As Date
                    Get
                        Global.System.Diagnostics.Debug.WriteLine("Getter of Retention passed")
                        Return DirectCast(DataObjects, Data.InfoComponentData).Retention
                    End Get
                    Set(ByVal value As Date)
                        DirectCast(DataObjects, Data.InfoComponentData).Retention = value
                    End Set
                End Property
                Public Property OtherProperties() As Xml.XmlDocument
                    Get
                        Global.System.Diagnostics.Debug.WriteLine("Getter of OtherProperties passed")
                        Return DirectCast(DataObjects, Data.InfoComponentData).OtherProperties
                    End Get
                    Set(ByVal value As Xml.XmlDocument)
                        DirectCast(DataObjects, Data.InfoComponentData).OtherProperties = value
                    End Set
                End Property

                Friend Overrides Function IsResponsible(ByVal ComponentDataType As Global.System.Type, ByVal Version As Global.System.Version) As Object
                    Return Type.Equals(ComponentDataType, New Components.Data.InfoComponentData().GetType())
                End Function
                Public Overrides ReadOnly Property IsSingleInstanceType() As Boolean
                    Get
                        Return True
                    End Get
                End Property
            End Class
        End Namespace
    End Namespace
End Namespace


